feat: Always stream INP and remove standalone v1 spans#22517
Open
logaretm wants to merge 3 commits into
Open
Conversation
Contributor
size-limit report 📦
|
INP is now always emitted as a v2 web vital span. With span streaming enabled it rides the streaming pipeline; with streaming disabled it overrides the static trace lifecycle for itself and still streams (sent directly via `captureSpan` + `createStreamedSpanEnvelope`, since it is a single span per interaction), because it reports late and would otherwise be dropped. INP was the last user of the standalone v1 span mechanism, so that is removed entirely: the `experimental.standalone` option, the `_isStandaloneSpan` handling and self-send path in `SentrySpan`, the `createSpanEnvelope` wire format, and the `SpanEnvelope`/`SpanItem` types and their exports from `@sentry/core` and `@sentry/types`. Also dedupes the v2 `SpanContainerItem` construction shared by `createStreamedSpanEnvelope` and gen_ai span extraction into `createSpanContainerItem`.
logaretm
force-pushed
the
awad/inp-always-v2-span
branch
from
July 23, 2026 13:26
e956bd9 to
8fb2e6d
Compare
logaretm
marked this pull request as ready for review
July 23, 2026 14:18
…e attribute - MIGRATION.md: note the removal of `createSpanEnvelope` and the `SpanEnvelope` / `SpanItem` types from `@sentry/core`. - E2E: assert `browser.web_vital.inp.value` on the INP span (the new payload field) in the react-17 / react-router-6 / react-router-7-spa / react-router-8-spa apps.
logaretm
requested review from
JPeer264,
chargome,
isaacs and
nicohrubec
and removed request for
a team
July 23, 2026 20:44
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 3 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit bd7695f. Configure here.
Under the static (transaction) trace lifecycle, force-streaming the INP span made it an ordinary tree span, so it was also swept into the pageload transaction (or emitted as its own transaction when parentless), double-sending INP. Reinstate a per-span standalone flag in core that sends the span on its own as a v2 streamed span and excludes it from transaction assembly. INP sets the flag when span streaming is disabled. Every piece of the mechanism is tagged with a TODO(standalone) marker for removal once the static trace lifecycle is dropped and every span streams on its own.
logaretm
force-pushed
the
awad/inp-always-v2-span
branch
from
July 23, 2026 20:49
96516ba to
09e3cbd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

INP is now always emitted as a v2 web vital span. With span streaming enabled it rides the streaming pipeline as before. With span streaming disabled (
traceLifecycle: 'static') INP overrides the static lifecycle for itself and still streams, because it reports late and would otherwise be dropped as a late child with nothing to carry it.The bundle size increase is due to the bytes that now have to live in core without being tree-shaken which re-uses some of the stuff gen_ai uses to send out independent v2 spans. It's only a few bytes, the browser bundle savings are more significant.
Note that there is still a bunch of
standalonereferences, those are needed to skip the span from becoming its own transaction in static lifecycles, it can be removed once we drop those in v12.